/*
 **  ITSessionDescMgr.h
 **
 **  Copyright (c) 2002, 2003
 **
 **  Author: Fabian, Ujwal S. Sathyam
 **	     Initial code by Kiichi Kusama
 **
 **  Project: iTerm
 **
 **  Description: keeps track of the address book data.
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License as published by
 **  the Free Software Foundation; either version 2 of the License, or
 **  (at your option) any later version.
 **
 **  This program is distributed in the hope that it will be useful,
 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 **  GNU General Public License for more details.
 **
 **  You should have received a copy of the GNU General Public License
 **  along with this program; if not, write to the Free Software
 **  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#import <Foundation/Foundation.h>

@class ITSessionDesc;

// notification is sent when list changes
extern NSString* kITSessionDescMgrNotification;

@interface ITSessionDescMgr : NSObject 
{
    NSMutableArray *_sessionDescs;
    NSString* _filePath;
}

+ (id)sharedInstance;

- (NSArray *)sessionDescs;
- (unsigned)numSessionDescs;
- (ITSessionDesc *)sessionDescAtIndex:(int)index;

- (void)addSessionDesc:(ITSessionDesc *)desc;
- (void)removeSessionDesc:(ITSessionDesc *)desc;
- (void)removeSessionDescAtIndex:(int)index;
- (void)replaceSessionAtIndex:(int)index withObject:(ITSessionDesc*)desc;

- (NSArray *)sessionDescNames;

- (void)setSessionFilePath:(NSString*)path;
- (void)saveSessions; // user responsible for calling save when needed

@end
